package com.marvels.financial.loan.service;

import com.marvels.common.exception.MarvelsBusinessException;
import com.marvels.financial.loan.dto.*;

import java.math.BigDecimal;

/**
 * @author 11271
 * @date 2024/3/13 11:45
 * @Description:
 * 转账支付
 */
public interface TransferPaymentApi {
    /**
     * 代扣支付
     * @param conditionDTO
     * @return
     */
    public PaymentResponse withholdPayment(HandleWithholePaymentDTO conditionDTO) ;



    /**
     * 代扣支付查询
     * @param reqNo 请求编号
     * @return
     */
    public PaymentResponse withholdPaymentQuery(WithholeQueryConditionDTO dto);




    /**
     * 代扣公共方法
     * @param dto
     */
    public PaymentResponse withholdCommonDeal(McfePaymentWithholdDTO dto) throws MarvelsBusinessException;


    /**
     * 代扣成功处理
     * @param contractDto
     * @param paymentWithholdDTO
     * @param detailDTO
     * @throws MarvelsBusinessException
     */
    public void withholdSuccess(McfeCustomerLoanContractDTO contractDto, McfePaymentWithholdDTO paymentWithholdDTO, McfePaymentWithholdDetailDTO detailDTO)  throws MarvelsBusinessException;


    /**
     * 展期费冲账
     * @param loanId
     * @param amount
     * @param extensionDay
     * @throws MarvelsBusinessException
     */
    public void extensionwithholdeSuccess(String loanId, BigDecimal amount, int extensionDay) throws MarvelsBusinessException;

    /**提前结清
     * @param dto
     * @return
     * @throws MarvelsBusinessException
     */
    public PaymentResponse withholdPreSettleDeal(McfePaymentWithholdDTO paymentWithholdDTO) throws MarvelsBusinessException;



    /**
     * 还款时 同步新绑定的卡到合同  还款计划表
     * @param contractDto
     * @return
     */
    public McfeCustomerLoanContractDTO synchronizedBankCard(McfeCustomerLoanContractDTO contractDto,String channel) ;
}
